package ch02.graphics;

import java.awt.*;

import javax.swing.*;

@SuppressWarnings("serial")
public class RectangleComponent extends JComponent
{
	public void paintComponent(Graphics g)
	{
		Graphics2D g2 = (Graphics2D) g;
		
		Rectangle box = new Rectangle(5, 10, 20, 30);
		
		Rectangle square = new Rectangle(20, 20, 20, 20);
		
		g2.draw(box);
		
		g2.draw(square);
	}

}
